wayland: Don't unset the selected mimetype on drop_reply
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 18 Apr 2015 16:02:50 +0000 (18:02 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 18 Apr 2015 16:11:27 +0000 (18:11 +0200)
gdk_wayland_drop_context_set_status() can't do much else currently besides
picking a mimetype (the first one is currently chosen). This may incorrectly
unset the mimetype chosen on .receive(), so the transfer is cancelled before
it even starts.

At the time drop_reply happens, we should have already picked a mimetype
along the way, so only cover for accepted=FALSE in order to unset it.

gdk/wayland/gdkdnd-wayland.c

index 71e8e49764f0c4701ded42948b0964d40fa5677b..9936e54c49769b2ba3c3142cf90124ae7f064764 100644 (file)
@@ -236,7 +236,8 @@ gdk_wayland_drag_context_drop_reply (GdkDragContext *context,
                                     gboolean        accepted,
                                     guint32         time_)
 {
-  gdk_wayland_drop_context_set_status (context, accepted);
+  if (!accepted)
+    gdk_wayland_drop_context_set_status (context, accepted);
 }
 
 static void